# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=sfuzz
pkgver=200.e1b62bd
pkgrel=2
groups=('blackarch' 'blackarch-fuzzer')
pkgdesc='A simple fuzzer.'
url='http://aconole.brad-x.com/programs/sfuzz.html'
arch=('x86_64' 'aarch64')
license=('BSD')
makedepends=('git')
source=("$pkgname::git+https://github.com/orgcandman/Simple-Fuzzer.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

build() {
  cd $pkgname

  ./configure --prefix=/usr

  make
}

package() {
  cd $pkgname

  install -dm 755 "$pkgdir/usr/bin"
  install -dm 755 "$pkgdir/usr/share"

  make BIN_DIR="$pkgdir/usr/bin/" SHARE_DIR="$pkgdir/usr/share/" \
    MAN_DIR="$pkgdir/usr/share/man/man1/" install
}

